<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
		<html>
		<head>
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
		<title>Message</title>
		<META HTTP-EQUIV="EXPIRES" CONTENT=0>
		<link rel="stylesheet" href="../../../../docs.css">
		</head>
		<body>
		
<br>
<h1>Io Reference</h1>
<br><br><br>
<br><br><br>
<a class='column' href='../../index.html'>Core</a>
&nbsp;&nbsp;<font color=#ccc>/</font>&nbsp;&nbsp;
<a class='column' href='../index.html'>Core</a>
&nbsp;&nbsp;<font color=#ccc>/</font>&nbsp;&nbsp;
<b>Message</b>
<br><br><br>
<br><br><br>
<table border=0 cellspacing=0 style="margin-left:8em; width:40em; line-height:1.2em;">
<tr>
<td align=right></td>
<td></td>
<td>A Message object encapsulates the action of a message send. 
Blocks are composed of a Message and its children.
<p>
Terminology
<pre>
Example:
  Io> msg := message(A B(C D); E F)
  ==> A B(C D); E F
  
In the above example:
  msg name            =>  A
  msg next            =>  B(C D); E F
  msg next arguments  =>  list(C D)
  msg next next name  =>  ;
  msg next next next  =>  E F
</pre>
Important: Modifying the message tree of a block currently in use may cause
a crash if a garbage collection cycle occurs. If the implementation were
changed to retain every called message, this could be avoided.
But the cost to performance seems to outweigh the need to cover this case for now.
</td></tr>
<tr><td colspan=3>&nbsp;</td></tr>
<tr><td colspan=3>&nbsp;</td></tr>
<tr><td colspan=3>&nbsp;</td></tr>
<tr>
<td align=right>
</td>
<td></td>
<td>
<hr align=left color=#ddd height=1>
<br><br>
<a name="Message-appendArg"></a><b>
appendArg(aMessage)
</b>
<p>
<div class=slotDescription>
Adds aMessage to the argument list of receiver. Examples:
<pre>	
Io> message(a) appendArg(message(b))
==> a(b)

Io> message(a(1,2)) appendArg(message(3))
==> a(1, 2, 3)
</pre>
</div>
<a name="Message-appendCachedArg"></a><b>
appendCachedArg(aValue)
</b>
<p>
<div class=slotDescription>
Adds aValue to the argument list of receiver as a cachedResult.
</div>
<a name="Message-argAt"></a><b>
argAt(indexNumber)
</b>
<p>
<div class=slotDescription>
Returns Message object for the specified argument or Nil if none exists.
</div>
<a name="Message-argCount"></a><b>
argCount
</b>
<p>
<div class=slotDescription>
Returns the number of arguments this message has. A faster way to do, msg arguments size. Examples,
<pre>	
Io> message(a(1,2,3)) argCount
==> 3

Io> message(a) argCount
==> 0
</pre>
</div>
<a name="Message-argsEvaluatedIn"></a><b>
argsEvaluatedIn(anObject)
</b>
<p>
<div class=slotDescription>
Returns a List containing the argument messages evaluated in the
	context of anObject.
</div>
<a name="Message-arguments"></a><b>
arguments
</b>
<p>
<div class=slotDescription>
Returns a list of the message objects that act as the
	receiver's arguments. Modifying this list will not alter the actual
	list of arguments. Use the arguments_() method to do that.
</div>
<a name="Message-asMessageWithEvaluatedArgs"></a><b>
asMessageWithEvaluatedArgs(optionalContext)
</b>
<p>
<div class=slotDescription>
Returns a copy of receiver with arguments evaluated in the context of sender if
	optionalContext is nil.
</div>
<a name="Message-asSimpleString"></a><b>
asSimpleString
</b>
<p>
<div class=slotDescription>
Returns one-line string representation up to 40 characters long.
</div>
<a name="Message-asStackEntry"></a><b>
asStackEntry
</b>
<p>
<div class=slotDescription>
Returns a string containing message name, file and line.
</div>
<a name="Message-asString"></a><b>
asString
</b>
<p>
<div class=slotDescription>
Same as code().
</div>
<a name="Message-cachedResult"></a><b>
cachedResult
</b>
<p>
<div class=slotDescription>
Returns the cached result of the Message or Nil if there is none.
</div>
<a name="Message-characterNumber"></a><b>
characterNumber
</b>
<p>
<div class=slotDescription>
Returns the message character number. The character number is typically
	the beginning character index in the source text from which the message was read.
</div>
<a name="Message-clone"></a><b>
clone
</b>
<p>
<div class=slotDescription>
Returns a Message that is a deep copy of the receiver.
</div>
<a name="Message-code"></a><b>
code
</b>
<p>
<div class=slotDescription>
Returns a String containing a decompiled code representation of the receiver.
</div>
<a name="Message-codeOfLength"></a><b>
codeOfLength(n)
</b>
<p>
<div class=slotDescription>
Same as <tt>Message code</tt>, but returns first <tt>n</tt> characters only.
</div>
<a name="Message-description"></a><b>
description
</b>
<p>
<div class=slotDescription>
Returns a string containing a short description of the method.
</div>
<a name="Message-doInContext"></a><b>
doInContext(anObject, locals)
</b>
<p>
<div class=slotDescription>
Evaluates the receiver in the context of anObject. Optional <tt>locals</tt> 
	object is used as message sender. <tt>anObject</tt> is used as sender otherwise.
</div>
<a name="Message-evaluatedArgs"></a><b>
evaluatedArgs
</b>
<p>
<div class=slotDescription>
Returns a List containing the argument messages evaluated in the context.
</div>
<a name="Message-fluxPath"></a><b>
fluxPath
</b>
<p>
<div class=slotDescription>
The directory where the .io files for the Flux views are located. This directory is added to the Importer searchPaths.
</div>
<a name="Message-fluxSource"></a><b>
fluxSource
</b>
<p>
<div class=slotDescription>
The directory of Flux where Flux.io is located. This directory is added to the Importer searchPaths.
</div>
<a name="Message-fromString"></a><b>
fromString(aString)
</b>
<p>
<div class=slotDescription>
Returns a new Message object for the compiled(but not executed)
	result of aString.
</div>
<a name="Message-hasCachedResult"></a><b>
hasCachedResult
</b>
<p>
<div class=slotDescription>
Returns true if there is a cached result. Nil is a valid cached result.
</div>
<a name="Message-isEndOfLine"></a><b>
isEndOfLine
</b>
<p>
<div class=slotDescription>
Returns true if the message marks the end of the line. A ';' message.
</div>
<a name="Message-label"></a><b>
label
</b>
<p>
<div class=slotDescription>
Returns the message label. The label is typically set to the
	name of the file from which the source code for the message was read.
</div>
<a name="Message-last"></a><b>
last
</b>
<p>
<div class=slotDescription>
Returns the last message in the chain.
</div>
<a name="Message-lastBeforeEndOfLine"></a><b>
lastBeforeEndOfLine
</b>
<p>
<div class=slotDescription>
Returns the last message in the chain before the EndOfLine or nil.
</div>
<a name="Message-lineNumber"></a><b>
lineNumber
</b>
<p>
<div class=slotDescription>
Returns the line number of the message. The character number
	is typically the line number in the source text from which the message was read.
</div>
<a name="Message-name"></a><b>
name
</b>
<p>
<div class=slotDescription>
Returns the name of the receiver.
</div>
<a name="Message-next"></a><b>
next
</b>
<p>
<div class=slotDescription>
Returns the next message in the message chain or nil if there is no next message.
</div>
<a name="Message-nextIgnoreEndOfLines"></a><b>
nextIgnoreEndOfLines
</b>
<p>
<div class=slotDescription>
Returns the next message in the message chain which is not an 
	EndOfLine or nil if there is no next message.
</div>
<a name="Message-previous"></a><b>
previous
</b>
<p>
<div class=slotDescription>
Returns the previous message in the message chain or Nil if there is no previous message.
</div>
<a name="Message-removeCachedResult"></a><b>
removeCachedResult
</b>
<p>
<div class=slotDescription>
Removes the cached result of the Message.
</div>
<a name="Message-setArguments"></a><b>
setArguments(aListOfMessages)
</b>
<p>
<div class=slotDescription>
Sets the arguments of the receiver to deep copies of
	those contained in aListOfMessages.  Returns self.
</div>
<a name="Message-setCachedArgs"></a><b>
setCachedArgs(listOfValues)
</b>
<p>
<div class=slotDescription>
Appends evaluated arguments to a message. Returns self.
</div>
<a name="Message-setCachedResult"></a><b>
setCachedResult(anObject)
</b>
<p>
<div class=slotDescription>
Sets the cached result of the message. Returns self.
</div>
<a name="Message-setCharacterNumber"></a><b>
setCharacterNumber(aNumber)
</b>
<p>
<div class=slotDescription>
Sets the character number of the message. Returns self.
</div>
<a name="Message-setLabel"></a><b>
setLabel(aString)
</b>
<p>
<div class=slotDescription>
Sets the label of the message and its children. Returns self.
</div>
<a name="Message-setLineNumber"></a><b>
setLineNumber(aNumber)
</b>
<p>
<div class=slotDescription>
Sets the line number of the message. Returns self.
</div>
<a name="Message-setName"></a><b>
setName(aString)
</b>
<p>
<div class=slotDescription>
Sets the name of the receiver. Returns self.
</div>
<a name="Message-setNext"></a><b>
setNext(aMessageOrNil)
</b>
<p>
<div class=slotDescription>
Sets the next message in the message chain to a deep copy of
	aMessage or it removes the next message if aMessage is nil.
</div>
<a name="Message-setPrevious"></a><b>
setPrevious(aMessageOrNil)
</b>
<p>
<div class=slotDescription>
Sets the previous message in the message chain to a deep copy of
	aMessage or it removes the previous message if aMessage is Nil.
</div>
<a name="Message-union"></a><b>
union(other) Creates a union of the receiver and the other parameter.
</b>
<p>
<div class=slotDescription>
Returns a new message object with the receivers message as the first argument of the returned message, 
	and the other parameter's arguments as each successive argument to the new message.
	<br/>
	<pre>
  Io> message(a) union(message(b))
  ==> [unnamed](a, b)
  </pre>
</div>
</td>
</tr>
</table>
<br><br><br><br><br>
</body>
</html>
